package Organization;

import Staff.FulltimeStaff;
import Staff.ParttimeStaff;

public class FinanceDepartment extends Department {
    @Override
    public void analyze(FulltimeStaff fulltimeStaff) {
        double wage = fulltimeStaff.getWorkHours() < 40
                ? fulltimeStaff.getWeeklyPay() - (40 - fulltimeStaff.getWorkHours()) * 80
                : fulltimeStaff.getWeeklyPay() + (fulltimeStaff.getWorkHours() - 40) * 100;
        System.out.println("正式员工: " + fulltimeStaff.getName() + " 周薪: " + wage);
    }

    @Override
    public void analyze(ParttimeStaff parttimeStaff) {
        System.out.println("临时员工: " + parttimeStaff.getName() + " 周薪: " + parttimeStaff.getHourlyPay() * parttimeStaff.getWorkHours());
    }
}
